<template>
    <div>
        <el-table
        v-loading="loading"
        :data="dataList"
        ref="singleTable"
        @select="selectRow"
        highlight-current-row
        :header-cell-style="{background:'#DADDE9',color:'#000',height:'34px'}"
        class="table-box historyImage"
        max-height="280"
    >
        <el-table-column
            type="selection"
            width="80"
            align="center"
        />
        
        <el-table-column
            label="名称"
            :show-overflow-tooltip="true"
            prop="name"
            align="center"
            width="250"
        />  
        <el-table-column
            label="坐标系"
            :show-overflow-tooltip="true"
            prop="coordinateType"
            align="center"
            width="250"
        />  
        <el-table-column
            label="影像拍摄时间"
            prop="remoteTime"
            :show-overflow-tooltip="true"
            align="center"  
        >
        </el-table-column> 
    </el-table>
</div>
</template>

<script>
import {delError} from "@/api/data/proData"
// import {flyToFeature} from '../showMap'
export default {
    name: "detailList",
    props: {
        //表格数据
        dataList: {
            type: Array
        },
        flyToFeature: {
            type: Function,
            default: null
        },
        //数据类别
        dataToSite:{}
    },
    data() {
        return {
            loading: false,
            // 查询条件
            // 是否显示弹出层
            open: false,
          
        };
    },
    created() {
    },
    computed: {
        popupData () {
            return this.$store.getters.popupData;　　//需要监听的地图点击数据
        }
        },
    watch:{
        popupData(val){
            // if (val) {
            //     this.setCurrent(val)
            // }
            // else{
            //     this.setCurrent()
            // }
        }
    },
    methods: {
        //单行选中触发
        selectRow(selection,row){
            let selected = selection.length && selection.indexOf(row) !== -1; //为true时选中，为 0 时（false）未选中
            this.$emit('listenSelectChange', selected,row);
        },
        /** 删除按钮操作 */
        handleDelete(row) {
            let errorID = row.abnormalId;
            this.$confirm(`是否确认删除此条异常点数据项?`, "警告", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning"
            }).then(function () {
                return delError(errorID);
            }).then(() => {
                this.$emit('listenDeleteChange', row);
                this.msgSuccess("删除成功");
            }).catch(() => { })
        },
        /** 查看详情 */
        handleUpdate1(row) {
            let dataType= this.dataToSite.dataType
            let data = {
                Id:row.id,
                dataType:dataType
            }
            this.$router.push({ name:'Table',query:data });
            this.$refs.singleTable.setCurrentRow(row);
        },
        dealThegeo(val){
            if(val){
                return val.replace("POINT","").replace("","").replace(" ",",")
            }
            else{
                return ""
            }
			},
    }
}
</script>
<style scoped>

.table-box{
    height: 280px;
}
.description {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    word-break: break-all;
    margin-block-end: 0px;
    margin-block-start: 0px;
}
.clearfix:before,
.clearfix:after {
    display: table;
    content: ""; /*不用有内容也可以*/
}

.clearfix:after {
    clear: both;
}

.clearfix {
    *zoom: 1;
}
.formbox{
    padding:20px 20px;
}

.el-table td,.el-table th{
     padding: 8px 0
 }
.deletBtn{
    color:red
}
.deletBtn:focus{
    color:#C90009  !important
}
.deletBtn:hover,.deletBtn:visited{
    color: #C90009;
}
.hiddenbox{
    z-index: -10;
}
</style>

